package com.nwcl.basic.service.impl;

import com.nwcl.basic.bo.CouponsWriteOffBO;
import com.nwcl.basic.dao.CouponsWriteOffDao;
import com.nwcl.basic.entity.CouponsWriteOff;
import com.nwcl.basic.service.CouponsWriteOffService;
import com.nwcl.common.utils.BeanUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author liguiqin
 * @date 2023/5/30
 */
@Service
public class CouponsWriteOffServiceImpl implements CouponsWriteOffService {
    @Autowired
    private CouponsWriteOffDao couponsWriteOffDao;
    @Override
    public Integer save(CouponsWriteOffBO writeOffBO) {
        CouponsWriteOff writeOff = BeanUtil.copy(writeOffBO, CouponsWriteOff.class);
        couponsWriteOffDao.save(writeOff);
        return writeOff.getId();
    }
}
